﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using PccCommonForC;

/// <summary>
/// Summary description for clsFunAp
/// </summary>
public class clsFunAp
{
    clsCommon clsCom = new clsCommon();
    public clsFunAp()
    {
        //
        // TODO: Add constructor logic here
        //
    }
    public string NoteTo_N(string Price, string Rate)
    {
       
        string str = "";
        str += "Số tiền cần thanh toán: " + clsCom.FormatMoney(Price) + " " + Rate;
        return str;

    }

    public string NoteTo_Y(string Repaid, string RemainPrice, string Rate)
    {
        string str = "";
        str += "Trả trước: " +clsCom.FormatMoney(Repaid) + " " + Rate + "<br>";
        str += "Còn lại: " + clsCom.FormatMoney(RemainPrice) + " " + Rate;
        return str;
    }

    public string NoteTo_Recover()
    {
        return "Lấy đơn lại";
    }

    public string NoteTo_S(string Repaid, string RemainPrice, string Rate)
    {
        string str = "";
        str += "Trả trước: " + clsCom.FormatMoney(Repaid) + " " + Rate + "<br>";
        str += "Còn lại: " + clsCom.FormatMoney(RemainPrice) + " " + Rate;
        return str;

    }
    public string NoteTo_E(string Price, string Rate)
    {
        string str = "";
        str += "Đã thanh toán: " + clsCom.FormatMoney(Price) + " " + Rate + "<br>"; 
        return str;

    }
    public string NoteTo_C()
    {
        string str = "";
        str += "Đã hủy đơn";
        return str;

    }


    public string ReturnStatus(string status)
    {
        if (status == "N")
            return "Chờ xác nhận";
        else if (status == "Y")
            return "Đã xác nhận";
        else if (status == "E")
            return "Đã giao hàng";
        else if (status == "S")
            return "Đang giao hàng";
        else if (status == "C")
            return "Đã hủy đơn";
        return "";
    }
    
}
